### Replication Package Overview

This package reproduces the results reported in the manuscript titled 
'Bayesian Sensitivity Analysis for Unmeasured Confounding in Causal Panel Data Models'.



#### Software and Environment


- R 4.1.2 with packages: MASS, ggplot2, gridExtra, modeest, parallel, readstata13, Rcpp, RcppArmadillo
- OS: MacOS Sequoia version 15.6.1
- Runtime: approximately 10 hours 
- Resources: 12 CPU cores, 36GB RAM, 0 GPU cores 

#### Additional details 

- Installation of the package 'bpCausal' relies on packages 'Rcpp' and 'RcppArmadillo'

- Run R file 0.run.R to replicate the results

- folder 'package':
  - the package 'bpCausal' to implement the proposed method

- R files in folder 'code':
  - sim.R: generate simulated dataset
  - summary_function.R: functions to summarize raw MCMC outputs 
  - plot_function.R: functions for results visualization
  - 1.sim_example.R: simulated example reported in the appendx
  - 2.sim_monte_carlo.R: Monte Carlo studies results
  - 3.sim_monte_carlo_summary_results.R: summarizing Monte Carlo studies results
  - 4.empirical_example.R: analysis of empirical application in section 5

- Results in folder 'results':
  - Monte Carlo studies with varying number of units and periods

- dataset in folder 'data':
  - Replication data for the empirical application 

- for replication, please create these folders: 'table', 'results', and 'plot' to match the paths that are used to save some results  


